
import { lazy } from 'react';

let MyHome = lazy(() => import("../Pages/index"));
let LoGoin = lazy(() => import("../Pages/Login/logo"));
let MyRegister = lazy(() => import("../Pages/register/Register"))
let GoodsDetile = lazy(() => import("../Pages/GoodsDilter/GoodsDilter"))
let Home = lazy(() => import("../Pages/Home/index"))
let MyGoods = lazy(() => import("../Pages/Goods/index"))
let GoodsIndex = lazy(() => import("../Pages/AllGoods/index"))
let MyShoppingcar = lazy(() => import("../Pages/MyShoppingCartlist/index"))
let MyMain = lazy(() => import("../Pages/Mine/MyMain"))
let MyCLoccet = lazy(() => import("../Pages/MyClecct/Collect"))
let MySearch = lazy(() => import("../Pages/MySearch/Search"))

export default [
  {
    path: "/home",
    component: MyHome,
    children: [
      {
        path: "/home/homes",
        component: Home
      },
      {
        path: "/home/todo",
        component: MyGoods
      },
      {
        path: "/home/message",
        component: GoodsIndex
      },
      {
        path: "/home/personalCenter",
        component: MyShoppingcar
      },
      {
        path: "/home/main",
        component: MyMain
      },
      {
        from: "/home",
        to: "/home/homes"
      }
    ]
  },
  {
    path: "/logo",
    component: LoGoin
  },
  {
    path: "/Collect",
    component: MyCLoccet
  }, {
    path: "/search",
    component: MySearch
  },
  {
    path: "/register",
    component: MyRegister
  }, {
    path: "/goodsdetil/:id",
    component: GoodsDetile
  }, {
    from: "/",
    to: "/home"
  }
]
